package com.kefu.smartCall.vo;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.kefu.common.vo.AbstractUpdateVo;
import com.kefu.smartCall.model.ScTask;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "编辑智能外呼任务")
public class ScTaskUpdateVo extends AbstractUpdateVo<ScTask,String> {
    @NotEmpty
    @ApiModelProperty("主键")
    private String taskId;
    @ApiModelProperty(value = "大模型筛选进度 0=进行中，1=已完成", name = "searchState")
    private Integer searchState;

    @Override
    public ScTask convert() {
        ScTask info = BeanUtil.toBean(this, ScTask.class);
        info.setUpdateTime(DateUtil.current());
        return info;
    }
}
